import 'package:flutter/material.dart';
import 'package:flutter_palette_generator_app/model/member.dart';
import 'package:flutter_palette_generator_app/resources/sizes.dart';
import 'package:flutter_palette_generator_app/resources/test_styles.dart';
import 'package:flutter_palette_generator_app/widgets/clipped_image.dart';


class MemberWidget extends StatelessWidget {
  final Member member ;
  final bool compactMode ;

  MemberWidget({this.member,this.compactMode = false});

  @override
  Widget build(BuildContext context) {
    return Row(
      children: <Widget>[
        DecoratedBox(
          decoration: BoxDecoration(
            borderRadius: ClippedImage.borderRadius
          ),
          child:   ClippedImage(imagePath:member.imagePath),
        ),
        SizedBox(width: size_12,),
        Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: <Widget>[
            Text(member.name,style: nameStyle,),
            SizedBox(height: size_8,),
            Text(member.occupation,style: occupationStyle,overflow:TextOverflow.clip,)
          ],
        )
      ],
    );
  }
}
